import { RouteConfig } from "vue-router";
import List from '@/pages/order/list.vue';
import Detail from '@/pages/order/detail.vue';
import manageOrderDetail from '@/pages/member/manageOrderDetail.vue';
import Result from '@/pages/order/result.vue';
import MerchantManage from '@/pages/order/merchantManage.vue';
import { ROUTE_NAME } from "@/lib/constant";

export const routes: RouteConfig[] = [
    {
        path: '/order/list',
        name: ROUTE_NAME.ORDER_LIST,
        meta: {
            title: '我的订单',
        },
        component: List,
    },
    {
        path: '/order/detail/:orderId',
        name: ROUTE_NAME.ORDER_DETAIL,
        meta: {
            title: '订单详情',
        },
        component: Detail,
    },
    {
        path: '/order/result/:type/:orderId',
        name: ROUTE_NAME.ORDER_RESULT,
        meta: {
            title: '我的订单',
        },
        component: Result,
    },
    {
        path: '/order/merchant_manage',
        name: ROUTE_NAME.ORDER_MERCHANT_MANAGE,
        component: MerchantManage,
    },
    // 在线管理-订单详情
    {
        path: '/member/manageOrderDetail/:orderId',
        name: ROUTE_NAME.ORDER_MANAGE_ORDER_DETAIL,
        meta: {
            title: '订单详情',
        },
        component: manageOrderDetail,
    },
];
